//
//  QPTabbarController.swift
//  QianPingNew
//
//  Created by Apple on 2019/5/14.
//  Copyright © 2019 Apple. All rights reserved.
//

import UIKit
import ESTabBarController_swift
class QPTabbarController: ESTabBarController {
    static let shared = QPTabbarController()
    override func viewDidLoad() {
        super.viewDidLoad()
        
        tabBar.isTranslucent = false
        
        let v1 = QPNavigationController(rootViewController: QPHomeViewController())
        let v2 = QPNavigationController(rootViewController: QPExperienceViewController())
        let v3 = QPNavigationController(rootViewController: QPMakeMoneyViewController())
        let v4 = QPNavigationController(rootViewController: QPMineViewController())
        
        
        v1.tabBarItem = ESTabBarItem.init(QPTabBarItemContentView(), title: "首页", image: UIImage(named: "tab_bar_home"), selectedImage: UIImage(named: "tab_bar_home_h"))
        v2.tabBarItem = ESTabBarItem.init(QPTabBarItemContentView(), title: "体验", image: UIImage(named: "tab_bar_share"), selectedImage: UIImage(named: "tab_bar_share"))
        v3.tabBarItem = ESTabBarItem.init(QPTabBarItemContentView(), title: "赚钱", image: UIImage(named: "tab_bar_mine"), selectedImage: UIImage(named: "tab_bar_mine_h"))
        v4.tabBarItem = ESTabBarItem.init(QPTabBarItemContentView(), title: "我的", image: nil, selectedImage: nil, tag: 1)
        
        viewControllers = [v1, v2, v3 ,v4]
        
        selectedIndex = 0
        
    }
}
